08. Quiz: Primary - Foreign Key Relationship
Helpful ERD For Answering the Below Questions
QUIZ QUESTION::
Match the appropriate definition or description to each term or column.
ANSWER CHOICES:
Definition or Column Description |
Term or Column |
---|---|
account_id |
|
ON accounts.id = web_events.id |
|
ON accounts.account_id = web_events.id |
|
ON web_events.account_id = accounts.id |
|
ON web_events.id = accounts.id |
|
Foreign Key |
|
Primary Key |
|
id |
SOLUTION:
Definition or Column Description |
Term or Column |
---|---|
account_id |
|
ON web_events.account_id = accounts.id |
|
Foreign Key |
|
Primary Key |
|
id |
SOLUTION:
- There is one and only one of these columns in every table.
- They are a column in a table.
SOLUTION:
- They are always linked to a primary key.
- In the above database, every foreign key is associated with the crow-foot notation, which suggests it can appear multiple times in the column of a table.